﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoGo
{
    //快状态
    enum BlockStatus
    {
        Blank=0,
        Green=1,
        Orange=2,
        Pink=3,
        Yellow=4,
        Blue=5,
        Purple=6,
        
    }
    
    //块对象
    class Block
    {
        //状态
        public BlockStatus Status { get; set; }
        //矩阵坐标
        public Point Point { get; set; }

        public Block(Point point, BlockStatus status)
        {
            //初始状态
            Status = status;
            Point = point;
        }
     

        public void Draw(Graphics g)
        {
            Image img = (Image)Properties.Resources.ResourceManager.GetObject("p" +(int)Status);
            Rectangle rectangle = new Rectangle(Point.X, Point.Y, 100, 100);
            g.DrawImageUnscaledAndClipped(img, rectangle);
        }

    }
}
